import {
RIG_PLATFORM_CHART_VERSION,
RIG_OPERATOR_CHART_VERSION
} from "../../src/constants/versions"
import CodeBlock from '@theme/CodeBlock';

# Setup guide
For a quick installation in an existing Kubernetes cluster, you can follow the [installation guide](/overview/guides/installation).

## Install Using Terraform
It is easy to install Rig with Terraform as well using Helm. The basic Terraform configuration for that is 

<CodeBlock language="hcl">
{`provider "helm" {
  kubernetes {
    # Your kubernetes configuration
  }
}

resource "helm_release" "rig_operator" {
  name = "rig-operator"
  repository = "https://charts.rig.dev"
  chart = "rig-operator"
  version    = "${RIG_OPERATOR_CHART_VERSION}"
  namespace = "rig-system"
  create_namespace = true
}

resource "helm_release" "rig_platform" {
  name = "rig-platform"
  repository = "https://charts.rig.dev"
  chart = "rig-platform"
  version    = "${RIG_PLATFORM_CHART_VERSION}"
  namespace = "rig-system"
  create_namespace = true
  set { # Not recommended for production!
    name = "postgres.enabled"
    value = "true"
  }
  depends_on = [helm_release.rig_operator]
}`
}

</CodeBlock>
This contains just basic configuration for the rig-operator and rig-platform.

## Extended installation guides

For real-world scenarios, we recommend using the extended installation guides, available here:

- [Rig Operator Setup guide](/operator-manual/setup-guide/operator)
- [Rig Platform Setup guide](/operator-manual/setup-guide/platform)


## Configuration

The Rig Operator and Platform both have a `values.yaml` file which specify how
to configure their respective Helm charts. The `values` files and their
defaults can be found here

- [Operator values](https://github.com/rigdev/rig/blob/main/deploy/charts/rig-operator/values.yaml)
- [Platform values](https://github.com/rigdev/rig/blob/main/deploy/charts/rig-platform/values.yaml)

To overwrite a default value when deploying, either supply your own values filee using `--values` or use `--set FIELD=VALUE` flags whenrunning `helm`.
